package Demo04.Demo05;

import java.io.IOException;
import java.io.RandomAccessFile;

public class Demo03_RandomAccessFile {
    public static void main(String[] args) throws IOException {
        RandomAccessFile r = new RandomAccessFile("G:\\小超\\untitled1\\wenjianjia\\a.txt", "r");
        String str = null;
        StringBuilder builder = new StringBuilder();
        while ((str = r.readLine())!=null){
            builder.append(str);
            builder.append("\n");
        }
        r.close();
        System.out.println(builder.reverse());
    }
}
